#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Aug 10 12:40:26 2021

@author: pi - lusiyuan

usage:
    [1]读取图像：img = cv2.imread("图像路径")
    [2]显示图像窗口：cv2.imshow("窗口名",img)
    [3]等待时长：cv2.waitKey(delay)   # delay = 0代表一直等待,任意键终止,毫秒级
    [4]关闭所有窗口：cv2.destroyAllWindows()  # delay = 0代表一直等待任意键终止
    

"""
import cv2 #默认为BGR读取格式，最好用opencv自带绘图程序
import matplotlib.pyplot as plt
import numpy as np


if __name__ == "__main__":
    img = cv2.imread('./1.image01.jpg')
    print(img)    
    """一张图片可以分为多个像素点，有长宽和通道三个维度，灰白图就一个通道，
    彩色图RGB三个通道通过print可以发现为三维数组，符合图像基本处理操作需求"""
    cv2.imshow("picture",img)    
    cv2.waitKey(0)
    cv2.destroyAllWindows()